﻿<%@ page title="" language="C#" masterpagefile="~/AdminMasterPage.master" enableeventvalidation="false" autoeventwireup="true" inherits="PL_Customer, App_Web_nuiswhgr" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .auto-style5
        {
            width: 52%;
        }

        .auto-style6
        {
            width: 52%;
            height: 891px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <table class="auto-style1" align="center">
        <tr>
            <td class="auto-style5" align="center">

                <br />
                <br />

                <asp:Label ID="ViewAddressLbl" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="Blue" Text="View Address"></asp:Label>
                <br />
                <br />
            </td>
        </tr>
        <tr>
            <td class="auto-style6" align="center">

                <asp:GridView ID="AddressGV" runat="server" AllowPaging="True" OnPageIndexChanging="AddressGV_PageIndexChanging1" OnSelectedIndexChanged="AddressGV_SelectedIndexChanged1" PageSize="3" AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black" OnRowDataBound="AddressGV_RowDataBound" Height="773px" Width="626px" OnRowEditing="AddressGV_RowEditing">
                    <Columns>

                        <asp:TemplateField SortExpression="Address Id" HeaderText="Address Id">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />
                            <ItemTemplate>
                                <asp:Label ID="AddressIdLbl" Text='<%# Eval("AddressId") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:Label ID="AddressIdTxtBx" Text='<%# Eval("AddressId") %>' Visible="false" ForeColor="#990033" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="Address" HeaderText="Address">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />
                            <ItemTemplate>
                                <asp:Label ID="AddressLine1Lbl" Text='<%# Eval("AddressLine1") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="AddressLine1TxtBx" Text='<%# Eval("AddressLine1") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                                <asp:Label ID="AddressLine2Lbl" Text='<%# Eval("AddressLine2") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="AddressLine2TxtBx" Text='<%# Eval("AddressLine2") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                                <asp:Label ID="AddressLine3Lbl" Text='<%# Eval("AddressLine3") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="AddressLine3TxtBx" Text='<%# Eval("AddressLine3") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                                <asp:Label ID="CityLbl" Text='<%# Eval("City") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="CityTxtBx" Text='<%# Eval("City") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                                <asp:Label ID="PinCodeLbl" Text='<%# Eval("PinCode") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="PinCodeTxtBx" Text='<%# Eval("PinCode") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                                <asp:Label ID="PhNumLbl" Text='<%# Eval("PhoneNumber") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="PhNumTxtBx" Text='<%# Eval("PhoneNumber") %>' Visible="false" ForeColor="#990033" runat="server" />
                                <br></br>
                            </ItemTemplate>
                        </asp:TemplateField>


                        <asp:TemplateField SortExpression="Address Created Date" HeaderText="Address Created Date">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />
                            <ItemTemplate>
                                <asp:Label ID="AddCrtdDtLbl" Text='<%# Eval("AddCrtdDt", "{0:d}") %>' Visible="true" ForeColor="#990033" runat="server" />
                                <asp:TextBox ID="AddCretdDtTxtBx" Text='<%# Eval("AddCrtdDt", "{0:d}") %>' Visible="false" ForeColor="#990033" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>


                        <asp:TemplateField HeaderText="Update ">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />

                            <ItemTemplate>
                                <asp:Button ID="UpdateBtn" runat="server" CommandName="update" Text="Update" OnClick="UpdateBtn_Click"></asp:Button>
                            </ItemTemplate>

                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Delete ">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />

                            <ItemTemplate>
                                <asp:Button ID="DeleteBtn" runat="server" CommandName="update" Text="Delete" OnClick="DeleteBtn_Click"></asp:Button>
                            </ItemTemplate>

                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Edit " Visible="false">
                            <HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" />

                            <ItemTemplate>
                                <asp:Button ID="EditBtn" runat="server" CommandName="edit" OnClick="EditBtn_Click" Text="Edit"></asp:Button>
                            </ItemTemplate>

                        </asp:TemplateField>



                    </Columns>

                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
                    <RowStyle BackColor="White" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />

                </asp:GridView>
                <br />
                <br />
                <asp:Label ID="Note" runat="server" Font-Bold="True" ForeColor="Red" Text="Note:Double click on the address which you want to modify"></asp:Label>
                <br />
                <br />

                <asp:Label ID="GridLbl" runat="server" Font-Bold="True" Font-Size="Larger" ForeColor="#FF3300"></asp:Label>
            </td>
        </tr>
    </table>

    <table class="auto-style1">
        <tr>
            <td colspan="7">
                <br />
                <br />
                <asp:Label ID="AddressLbl" runat="server" Font-Bold="True" Font-Size="X-Large" Text="Address" ForeColor="Blue"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="AddressLine1Lbl" runat="server" Text="Address Line1" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="AddressLine1TxtBx" runat="server" CausesValidation="True" ValidationGroup="b" Height="16px" Width="116px"></asp:TextBox>
            </td>
            <td align="left" colspan="3">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                    ControlToValidate="AddressLine1TxtBx" ErrorMessage="Address1 field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>

            </td>
        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="AddressLine2Lbl" runat="server" Text="Address Line2" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="AddressLine2TxtBx" runat="server"></asp:TextBox>

            </td>
            <td align="left" colspan="3">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                    ControlToValidate="AddressLine2TxtBx" ErrorMessage="Address2 field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td align="left" colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="AddressLine3Lbl" runat="server" Text="Address Line3" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left" colspan="4">
                <asp:TextBox ID="AddressLine3TxtBx" runat="server"></asp:TextBox>
            </td>

        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="CityLbl" runat="server" Text="City" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="CityTxtBx" runat="server"></asp:TextBox>
            </td>
            <td align="left" colspan="3">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                    ControlToValidate="CityTxtBx" ErrorMessage="City field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="PinCodeLbl" runat="server" Text="Pin Code" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="PinCodeTxtBx" runat="server"></asp:TextBox>
            </td>
            <td align="left" colspan="3"><asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                    ControlToValidate="PinCodeTxtBx" ErrorMessage="Pincode field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="5">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="PhoneNumberLbl" runat="server" Text="Phone Number" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="PhoneNumTxtBx" runat="server"></asp:TextBox>
            </td>
            <td align="left" colspan="3">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                    ControlToValidate="PhoneNumTxtBx" ErrorMessage="Phone number field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
                <asp:CustomValidator ID="CustomValidator1" runat="server"
                     ControlToValidate="PhoneNumTxtBx" ErrorMessage="Provide a valid phone number" 
                    Font-Bold="True" ForeColor="#FF3300" OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="b">*</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td align="left" colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="2">
                <asp:Label ID="EmailIdLbl" runat="server" Text="Email Id" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left" colspan="3">
                <asp:TextBox ID="EmailTextBx" runat="server"></asp:TextBox>
            </td>
            <td align="left" colspan="2">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
                    ControlToValidate="EmailTextBx" ErrorMessage="Email Id field should not be empty"
                    ValidationGroup="b" Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td align="left" colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:Label ID="AddCrtdDtLbl" runat="server" Text="Address Created Date" Font-Bold="True" ForeColor="#990033"></asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="AddCrtdDtTxtBx" runat="server" ReadOnly="True"></asp:TextBox>
            </td>
            <td align="left" colspan="3">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="7">
                <asp:Button ID="AddBtn" runat="server" ValidationGroup="b" OnClick="AddBtn_Click" Text="Add" />
            </td>
        </tr>
        <tr>
            <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="7">
                <script type="text/javascript">

                    function HideLabel() {
                        document.getElementById('<%= DsplyLbl.ClientID %>').style.display = "none";
                        document.getElementById('<%= GridLbl.ClientID %>').style.display = "none";

                    }
                    setTimeout("HideLabel();", 3000);
                </script>
                <asp:Label ID="DsplyLbl" runat="server" Font-Bold="True" Font-Size="Larger" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" Font-Bold="True" ForeColor="Red" Height="39px" Width="318px" ValidationGroup="b" />
            </td>
            <td>&nbsp;</td>
        </tr>
    </table>

</asp:Content>
